<template>
  <div class="dashboard-editor-container">
    <h2>欢迎您登录</h2>
    <div class="gettime">{{gettime}}</div>
  </div>
</template>

<script>


export default {
  name: 'DashboardAdmin',
  data() {
    return {
      gettime:""
    }
  },
  created(){
    window.setInterval(() => {
      this.getCurrentTime()
    },1000)
  },
  methods: {
    getCurrentTime() {
        //获取当前时间并打印
        var _this = this;
    　　let yy = new Date().getFullYear();
    　　let mm = new Date().getMonth()+1;
    　　let dd = new Date().getDate();
    　　let hh = new Date().getHours();
    　　let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
    　　let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
    　　_this.gettime = yy+'年'+mm+'月'+dd+'日 '+hh+':'+mf+':'+ss;
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard-editor-container {
  padding: 32px;
  position: relative;
  h2{
    font-family: cursive;
    font-size: 41px;
    color: #ff4949;
  }
  .gettime{
    color: #1890ff;
    font-size: 19px;
  }
  .chart-wrapper {
    background: #fff;
    padding: 16px 16px 0;
    margin-bottom: 32px;
  }
}

@media (max-width:1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}
</style>
